# performance.profile

- **Type:** `boolean`
- **Default:** `false`

Whether to capture timing information for each module, the same as the [profile](https://rspack.rs/config/other-options#profile) config of Rspack.

When enabled:

- Rsbuild will automatically generate a `dist/stats.json` file through [bundle analyzer](https://github.com/webpack/webpack-bundle-analyzer).
- Rspack will include build-time information when generating stats.json or other statistics files.

## Example

```ts title="rsbuild.config.ts"
export default {
  performance: {
    profile: true,
  },
};
```

When enabled, Rspack generates a JSON file with statistics about modules, including timing information for each module.

## Guide

Please refer to the [Build profiling](/guide/debug/build-profiling) page for more methods to analyze build performance.
